package blogger.client.eventqueqe.events;

import blogger.client.eventqueqe.handlers.TwitDeletingHandler;
import blogger.client.ui.widgets.TwitView;

import com.google.gwt.event.shared.GwtEvent;

/**
 * Created by IntelliJ IDEA.
 * User: mega
 * Date: 06.01.2010
 * Time: 23:21:41
 * To change this template use File | Settings | File Templates.
 */
public class TwitDeletedEvent extends GwtEvent<TwitDeletingHandler>{

    private TwitView twitView = null;

    public static final Type<TwitDeletingHandler> TYPE = new Type<TwitDeletingHandler>();

    public TwitDeletedEvent() {
        super();
    }

    public TwitDeletedEvent(TwitView twitView) {
        super();
        this.twitView = twitView;
    }

    @Override
    public Type<TwitDeletingHandler> getAssociatedType() {
        return  TYPE;
    }

    @Override
    protected void dispatch(TwitDeletingHandler handler) {
        handler.onTwitDeleted(this);
    }

    public TwitView getTwitView() {
        return twitView;
    }

}
